package com.quanyan.place.mapper;

import com.quanyan.place.entity.TbBizPlaceCategory;
import com.quanyan.place.entity.TbBizPlaceUnitSalePlan;
import com.quanyan.place.entity.apireq.ReqPlaceOrderListVo;
import com.quanyan.place.entity.apireq.ReqSearchVo;
import com.quanyan.place.entity.vo.PlaceUnitSalePlan;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface PlaceUnitSalePlanMapper {
    List<TbBizPlaceUnitSalePlan> selectByPrimaryKeyList(@Param("reqPlaceOrderListVo") ReqPlaceOrderListVo reqPlaceOrderListVo);

    List<TbBizPlaceUnitSalePlan> selectSalePlanForUpdate(@Param("reqPlaceOrderListVo") ReqPlaceOrderListVo reqPlaceOrderListVo);

    int updateByPrimaryKeyList(@Param("reqPlaceOrderListVo") ReqPlaceOrderListVo reqPlaceOrderListVo);

    int updateSalePlanLockStatus(@Param("reqPlaceOrderListVo") ReqPlaceOrderListVo reqPlaceOrderListVo);

    int updateSalePlanOrderStatus(@Param("reqPlaceOrderListVo") ReqPlaceOrderListVo reqPlaceOrderListVo);

    List<TbBizPlaceUnitSalePlan> selectSaleIdList(@Param("map")Map<String,Object> map);

    List<Integer> searchCount(ReqSearchVo reqSearchVo);

    List<Integer> searchByTerm(ReqSearchVo reqSearchVo);

    List<TbBizPlaceUnitSalePlan> getBizPlaceMinPrice(PlaceUnitSalePlan placeUnitSalePlan);

    Map getPlaceUnitTime(@Param("placeId")Integer placeId, @Param("categoryId")Integer categoryId);

    List<Integer> searchByDb(ReqSearchVo reqSearchVo);

    List<TbBizPlaceCategory> getLPriceByPlaceId(Integer placeId);

    int batchInsertSalePlan(@Param("list") List<TbBizPlaceUnitSalePlan> unitSalePlanList);
    
    TbBizPlaceUnitSalePlan queryUnitSalePlan(Integer placeUnitId);
}